Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add database constraints for users table #595

Merged
merged 3 commits into from
Jan 22, 2025
Merged

Conversation

Freika
Copy link
Owner

@Freika Freika commented Dec 26, 2024

No description provided.

@Freika Freika requested a review from Copilot December 26, 2024 20:34

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • Gemfile: Evaluated as low risk
Comments suppressed due to low confidence (3)

db/migrate/20241226202204_add_database_users_constraints.rb:5

  • [nitpick] The constraint name 'users_email_null' is ambiguous. It should be renamed to 'users_email_not_null' for better clarity.
add_check_constraint :users, 'email IS NOT NULL', name: 'users_email_null', validate: false

db/migrate/20241226202204_add_database_users_constraints.rb:6

  • [nitpick] The constraint name 'users_admin_null' is ambiguous. It should be renamed to 'users_admin_not_null' for better clarity.
add_check_constraint :users, 'admin IS NOT NULL', name: 'users_admin_null', validate: false

app/models/user.rb:24

  • Ensure that the admin attribute's default value and behavior are covered by tests.
attribute :admin, :boolean, default: false
@Freika Freika changed the base branch from master to dev January 22, 2025 14:05
@Freika Freika merged commit f472f6b into dev Jan 22, 2025
3 of 4 checks passed
@Freika Freika deleted the chore/database-user-constraints branch January 22, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant